package com.gmrz.uap.config;

import javax.servlet.ServletOutputStream;
import javax.servlet.WriteListener;
import java.io.IOException;
import java.io.OutputStream;

/**
 * @author Wang Haifeng
 */
class ResponseServletOutputStream extends ServletOutputStream {
    private final OutputStream outputStream;

    public ResponseServletOutputStream(OutputStream outputStream) {
        this.outputStream = outputStream;
    }

    @Override
    public void write(int b) throws IOException {
        outputStream.write(b);
    }

    @Override
    public boolean isReady() {
        return false;
    }

    @Override
    public void setWriteListener(WriteListener writeListener) {
        // TODO document why this method is empty
    }
}